class CreateMovies < ActiveRecord::Migration
  def self.up
    create_table :movies do |t|
      t.column :name,           :string
      t.column :movie_genre,    :string
      t.column :show_status,    :string
      t.column :show_time,      :datetime
      t.column :cost,           :decimal,  :precision => 10, :scale => 2, :default => 0
      t.column :spectator_type, :string
      t.column :ticket_price,   :decimal,  :precision => 10, :scale => 2, :default => 0
      t.column :sale_amount,    :decimal,  :precision => 10, :scale => 2, :default => 0
      t.column :created_at,     :datetime
      t.column :updated_at,     :datetime
    end
  end

  def self.down
    drop_table :movies
  end
end
